// pages/orderList/orderList.js.js
Page({
    data:{
        useId:'',
        orderList:[
            {
                picture:'',
                intro:'afdsaffasfaf',
                price:'23',
            }
        ]
    },
    queryOrderList(){
        var that = this;
        var app = getApp();
        that.data.useId = app.data.useId;
        wx.request({
            url: 'http://localhost:8080/order/search?userId='+that.data.useId,
            method:'GET',
            header:{
                'content-type':'application/json'
            },
            success:function(res){
                that.setData({
                    orderList:res.data.data,
                })
            }
        })
    },
    onShow(){
        this.queryOrderList();
    }
})